package com.cmas.platform.domain;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import com.aidex.common.core.domain.BasePlusEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aidex.common.utils.log.annotation.FieldRemark;
import com.aidex.common.utils.log.annotation.LogField;
import com.aidex.common.annotation.Excel;

/**
 * 审核配置表对象 approve_config
 *
 * @author su
 * @email 1218819874@qq.com
 * @date 2023-03-13
 */
@Data
public class ApproveConfig extends BasePlusEntity {
    private static final long serialVersionUID = 1L;

    /**
     *
     * 审核配置名称
     */
    @Excel(name = "审核配置名称")
    @NotBlank(message = "审核配置名称不允许为空")
    @Size(max = 50, message = "审核配置名称长度不能超过50个字符")
    @LogField
    @FieldRemark(name = "审核配置名称", field = "name")
    private String name;

    /**
     * 审核配置项目ID
     */
    @Excel(name = "审核配置项目ID")
    @NotBlank(message = "审核配置项目ID不允许为空")
    @LogField
    @FieldRemark(name = "审核配置项目ID", field = "itemId")
    private String itemId;

    /**
     * 审核方式
     */
    @Excel(name = "审核方式", dictType = "approve_method")
    @NotBlank(message = "审核方式不允许为空")
    @LogField
    @FieldRemark(name = "审核方式", field = "method")
    private String method;

    /**
     * 审核原因
     */
    @Excel(name = "审核原因")
    @LogField
    @FieldRemark(name = "审核原因", field = "sentence")
    private String sentence;

    /**
     * 审核状态
     */
    @LogField
    @Excel(name = "审核状态", dictType = "platform_action_status")
    @FieldRemark(name = "审核状态",field = "status")
    @TableField(value = "status", fill = FieldFill.INSERT)
    private String status;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("name", getName())
                .append("itemId", getItemId())
                .append("status", getStatus())
                .append("method", getMethod())
                .append("sentence", getSentence())
                .append("remark", getRemark())
                .append("id", getId())
                .append("createBy", getCreateBy())
                .append("createDept", getCreateDept())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("updateIp", getUpdateIp())
                .append("version", getVersion())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
